package com.zhw.mapper;

import com.github.pagehelper.Page;
import com.zhw.pojo.Book;
import com.zhw.pojo.BookDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.DeleteMapping;

@Mapper
public interface BookMapper {


    Page<Book> page(BookDTO bookDTO);

    @Select("select * from book where ISBN=#{isbn}")
    Book getByID(String isbn);

    void update(Book book);

    void save(Book book);

    @Delete("delete from book where ISBN=#{isbn}")
    void delete(String isbn);
}
